/**
 * @description tab
 */
const state = () => ({
  modal: false, //弹框
  title: '绑定表单',
  addKeyModal: false, //弹框
  paramModal: false,
})
const getters = {
  getModal: (state) => state.modal,
  getAddKeyModal: (state) => state.addKeyModal,
  getparamModal: (state) => state.paramModal,
  getTitle: (state) => state.title,
}
const mutations = {
  modalSwitch(state) {
    state.modal = !state.modal
  },
  addKeyModalSwitch(state) {
    state.addKeyModal = !state.addKeyModal
  },
  setParamModalSwitch(state) {
    state.paramModal = !state.paramModal
  },
  setTitle(state, title) {
    state.title = title
  },
}
const actions = {
  modalSwitch({ commit }) {
    commit('modalSwitch')
  },
  addKeyModalSwitch({ commit }) {
    commit('addKeyModalSwitch')
  },
  setParamModalSwitch({ commit }) {
    commit('setParamModalSwitch')
  },
  setTitle({ commit }, title) {
    commit('setTitle', title)
  },
}
export default { state, getters, mutations, actions }
